package configfactory;

import entity.Coffee;

public class Test {
    public static void main(String[] args) {
        //获取spring上下文
        SimpleFactory simpleFactory=new SimpleFactory();

        //通过spring上下文获取我们想要的对象
        Coffee coffee=(Coffee)simpleFactory.getBean("maoShi");

        //调用方法
        System.out.println(coffee.getName());
    }
}
